<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            width: 100%;
            height: 100%;
        }
        .main{
            width: 100%;
            height: 100%;
            overflow: hidden;
            position: relative;
        }
        img{
            width: 100%;
            height: 100%;
        }
        p{
            position: absolute;
            top:20px;
            right: 30px;
            color: white;
            font-size: 20px;
        }
    </style>
</head>
<body>
<div class="main">
    <img src="<?php echo UPLOAD_SITE_URL.'/'.ATTACH_MOBILE.'/app/'.$output['mb_adv_img'];?>" alt="">
    <p>3</p>
</div>
<script>
    var p=document.getElementsByTagName('p')[0];
    var time=Number(p.innerHTML);
    timer=setInterval(function () {
        p.innerHTML=time--;
        if (time == 0) {
            <?if($output['mb_adv_link']) {?>
            location.href =  '<? echo $output['mb_adv_link'];?>';
            return;
            <?}?>
            location.href = '/';
        }
    },1000)
</script>
</body>
</html></html>
